﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using DotNetNuke.ComponentModel.DataAnnotations;
using DotNetNuke.Data;
using DotNetNuke.Security.Roles;
using DotNetNuke.Entities.Users;

namespace DotNetNuke.Modules.mwOrgChart.Components.Business
{
    [TableName("mwHierarchiesRelations")]
    [PrimaryKey("id")]
    public class mwHierarchyRelations
    {
        public int ID { get; set; }
        public int RoleID { get; set; }
        public int HNodeID { get; set; }
        public int UserID { get; set; }

        //solo per testare il mapping con glli uffici
        public int OfficeID { get; set; }
        
        public DateTime? FromDate { get; set; }
        public DateTime? ToDate { get; set; }

        public int CreatedByUserId { get; set; }
        public DateTime CreatedOnDate { get; set; }        
        public int LastModifiedByUserId { get; set; }
        public DateTime LastModifiedOnDate { get; set; }

        // Full Objects
        [IgnoreColumn]
        public RoleInfo Role { get; set; }

        [IgnoreColumn]
        public mwHierarchy Node { get; set; }

        [IgnoreColumn]
        public UserInfo User { get; set; }

    }

    public class mwHierarchyTextRelations
    {
        public int ID { get; set; }
        public string FullRoleAndRole { get; set; }
        public string RoleName { get; set; }
        public string Username { get; set; }
        public string UserDisplayName { get; set; }
        public string NodeName { get; set; }
        public int NodeID { get; set; }

    }

}